﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace BootstrapAdmin.DataAccess.Models;

/// <summary>
/// 出站/存档信息
/// </summary>
[Table("ops_archive")]
public class Archive
{
    [Key]
    public int Id { get; set; }

    /// <summary>
    /// 工站
    /// </summary>
    [NotNull]
    [Required]
    [Display(Name = "工站")]
    public string? Station { get; set; }

    /// <summary>
    /// 产品代码
    /// </summary>
    [Display(Name = "产品编码")]
    public string? ProductCode { get; set; }

    /// <summary>
    /// 工单
    /// </summary>
    [Display(Name = "工单")]
    public string? OrderNo { get; set; }

    /// <summary>
    /// SN
    /// </summary>
    [NotNull]
    [Required]
    [Display(Name = "SN")]
    public string? SN { get; set; }

    /// <summary>
    /// 过站结果
    /// </summary>
    [Display(Name = "过站结果")]
    public int Pass { get; set; }

    /// <summary>
    /// CT 时长
    /// </summary>
    [Display(Name = "CT")]
    public int Cycletime { get; set; }

    /// <summary>
    /// 操作人
    /// </summary>
    [Display(Name = "操作人")]
    public string? Operator { get; set; }

    /// <summary>
    /// 班次
    /// </summary>
    [Display(Name = "班次")]
    public string? Shift { get; set; }

    /// <summary>
    /// 托盘码
    /// </summary>
    [Display(Name = "托盘码")]
    public string? Pallet { get; set; }

    /// <summary>
    /// 记录时间
    /// </summary>
    [Display(Name = "出站时间")]
    public DateTime CreatedAt { get; set; }
}
